package jdk5.generic;

import java.util.HashSet;
import java.util.Iterator;

import jdk5.common.Student;

public class Group{
        private HashSet<Student> students;

        public Group(){
               students = new HashSet<Student>();
        } 

        public void join(Student student){
              students.add(student);
       }

       public void leave(Student student){
              students.remove(student); 
      }

      public Iterator<Student> iterator(){
             return students.iterator();
      } 
}

